#ifndef __ROCKET_LAYER_H__
#define __ROCKET_LAYER_H__

#include "cocos2d.h"
using namespace cocos2d;
#include "constants.h"

class RocketLayer : public cocos2d::CCLayer
{
public:
	RocketLayer() : m_bSecondUpdateColor(false), m_bCanClick(true) {}
	CREATE_FUNC(RocketLayer);
	virtual bool init();
	static cocos2d::CCScene* scene();
	virtual void ccTouchesBegan(CCSet *pTouches, CCEvent *pEvent);
	virtual void update(float dt);
	void updateColor();
	bool m_bSecondUpdateColor;
	bool m_bCanClick;

	void cbUpdateColor();

	CCSprite* m_Rocket[ROW];
	CCParticleSystemQuad* m_RocketFire[ROW];
	void genRocket(int row);

	// time
	CCSprite* m_Lattern[LATERN_NUM];
	void SetTime(float t);
	void cbChangeLatternTex(CCNode* pNode);
};

#endif // __ROCKET_LAYER_H__
